from selenium import webdriver
from selenium.webdriver.edge.service import Service as EdgeService
from selenium.webdriver.edge.options import Options as EdgeOptions



# 创建 WebDriver 对象
# 打开网页

class Driver:
    def __init__(self,http,ServeicePath):
        service = EdgeService(executable_path=ServeicePath)
        edge_options = EdgeOptions()
        driver = webdriver.Edge(service=service, options=edge_options)
        self.dri = driver.get(http)  # 请替换为实际网址

    def dirCloes(self):
        self.dri.cloes()
